{% set more_projects = app.generic.modelData('Projects', 'entity.gallery != 0 AND entity.home = 0', {}, { sort: 'rank', order: 'ASC' }) %}

{% extends 'base.twig' %}

{% block banner %}{% endblock %}

{% block news %}{% endblock %}

{% block content %}
	<div class="wrapper style2" style="padding-bottom: 0;">
		<div class="inner">
			<div class="container">
				<div id="content">
					<!-- Content -->
						<article>
							<header class="major">
								<h2>{{ page.title }}</h2>
								<p>Accumsan dui ata blandit odio</p>
							</header>
					</article>
				</div>
			</div>
		</div>
	</div>
	
	<div class="wrapper style2" style="padding-top: 0;">
		<div class="inner">
			<!-- Feature 2 -->
				<section class="container box feature2">
					<div class="row">
						<div class="12u">
							<h2>我们最好的作品</h2>
							<p>
								我们日常都是向新西兰和澳大利亚的顶级公司提供技术支持<br>
								包括网站设计和系统开发<br>
								但是因为隐私问题，不能放在这里<br>
								不过我们可以在面谈时作为方案例子演示</p>
							{% for i in 1..4 %}
								<div class="project">
									<h1>Top company</h1>
									<img src="http://placehold.it/290x150?text=Mysterious" />
								</div>
							{% endfor %}
					</div>
				</section>
			</div>
	</div>
	
	<div class="wrapper style2" style="padding-top: 0;">
		<div class="inner">
			<!-- Feature 2 -->
				<section class="container box feature2">
					<div class="row">
						<div class="12u">
							<h2>我们最近的作品</h2>
							{% for itm in projects._data %}
								{% set images = app.generic.modelData('Asset', 'entity.parentId = ' ~ itm.gallery, {}, { sort: 'rank', order: 'ASC' }) %}
								{% if images._data|length > 0 %}
									<div class="project">
										<a href="/portfolio-detail/{{ itm.id }}/">
											<h1>{{ itm.title }}</h1>
											<img src="/assets/image/{{ images._data.0.id }}/290/" />
										</a>
									</div>
								{% endif %}
							{% endfor %}
					</div>
				</section>
			</div>
	</div>
	
	<div class="wrapper style2" style="padding-top: 0;">
		<div class="inner">
			<!-- Feature 2 -->
				<section class="container box feature2">
					<div class="row">
						<div class="12u">
							<h2>更多的作品</h2>
							{% for itm in more_projects._data %}
								{% set images = app.generic.modelData('Asset', 'entity.parentId = ' ~ itm.gallery, {}, { sort: 'rank', order: 'ASC' }) %}
								{% if images._data|length > 0 %}
									<div class="project">
										<a href="/portfolio-detail/{{ itm.id }}/">
											<h1>{{ itm.title }}</h1>
											<img src="/assets/image/{{ images._data.0.id }}/290/" />
										</a>
									</div>
								{% endif %}
							{% endfor %}
					</div>
				</section>
			</div>
	</div>
{% endblock %}